arm: imx: hab: Make authenticate_image() return zero on open boards
authorBryan O'Donoghue <[email protected]>
Fri, 12 Jan 2018 12:40:15 +0000 (12:40 +0000)
committerStefano Babic <[email protected]>
Sun, 14 Jan 2018 16:26:30 +0000 (17:26 +0100)
commit4467ae6c28aa7eef84d5784f56234472a015d5e2
tree49d0c926640e4441d88e72f5121e4d4cecb69e6d
parente5b30e4ac19b745ef5ed75813d48fa78d7c579f6
arm: imx: hab: Make authenticate_image() return zero on open boards

The BootROM will not successfully process a HAB image passed by u-boot
unless the board has been set into locked mode. Some of the existing usages
of authenticate_image() expect and rely on unlocked boards doing the
following

1. Not calling into the BootROM authenticate_image() callback
2. Returning a pass status for authenticate_image() calls anyway

A previous patch removed the necessity to call into imx_hab_is_enabled()
twice. This patch ensures the reliance on authenticate_image() returning
zero is maintained.

Signed-off-by: Bryan O'Donoghue <[email protected]>
Suggested-by: Breno Matheus Lima <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Albert Aribaud <[email protected]>
Cc: Sven Ebenfeld <[email protected]>
Cc: George McCollister <[email protected]>
Tested-by: Breno Lima <[email protected]>
arch/arm/mach-imx/hab.c